
#include "boost_semantic_graph.hpp"

int value_compare(SemanticPoint const & a,SemanticPoint const & b) {
	// 0 equal
	// a < b for each component : 1
	// b < a for each component : 2
	// a and b not comparable : -1
	int score = 0;
	if(a.size() != b.size()) return (a.size() < b.size())?  1:2;
	for(int xi =0;xi <  a.size();++xi) {
		if(a.get(xi) == b.get(xi)) continue;
		else if (a.get(xi) < b.get(xi)) {
			if (score == 1) continue;
			else if(score == 0) score = 1;
			else return -1;
		}
		else {
			if(score == 2) continue;
			else if(score ==0) score = 2;
			else return -1;
		}
	}
	return score;
}

/*
int boost_semantic_all_parents_query(NodeList & result, EdgeList & ext,
					SemanticGraph const & g,NodeList const & external_nodes,EdgeList const & source_and_dest,SemanticPoint const & query) {
	std::set< std::pair<vertex_descriptor,vertex_descriptor> > external_propag;
	std::set< std::pair<vertex_descriptor,vertex_descriptor> > internal_propag;	
	std::set< std::pair< vertex_descriptor, int > > already;	
	for(std::size_t xi = 0;xi <  source_and_dest.size();xi++)
	{
		internal_propag.push_back( std::make_pair( static_cast<std::size_t>(source_and_dest.getsrc(i)) , static_cast<std::size_t>(source_and_dest.getdst(i))) );
	}
	int n_iterations = 0;
	while( internal_propag.size() > 0) {
		std::pair<vertex_descriptor,vertex_descriptor> src_dst;
		boost::tie(src_dst.first,src_dst.second) = internal_propag.pop();
		n_iterations += 1;
		// do propag 
		int weight = 
	}
	return n_iterations;	
}
*/
